import QtQuick 2.0
import QtQuick.Layouts 1.3
import Quick.UIComponent.SplitLine  0.1
import  Quick.DataComponent.Json  0.1
import "content"

Item{
    id:root
    width: 800
    height: 480

    property alias titleList:table.titleList
    property alias  json: jsonModel.json
    property alias  query: jsonModel.query
    property bool  isJsonModel:true
    property alias listModel:table.myModel
    property alias length:table.length
    property alias sortReg:table.sortReg


    TableDeletege{
        id:table
        anchors.fill: parent
        myModel: judgeJsonNull()? listModel : jsonModel.model
    }

    JsonListModel{
        id:jsonModel
        onJsonChanged: {
        }
    }

    function judgeJsonNull(){
        if(isJsonModel) return false
        if("" === json || "" === query ){
            return true
        }
        return false
    }


}
